# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
# Contributor: Niklas Holm <jadedcyborg@gmail.com>

# Order is important, primary package first
declare -rga _realname=(perl perl-doc)
pkgname=()
declare -gA _pkgname=()
local _n _p
for _n in "${_realname[@]}"; do
    _p="${MINGW_PACKAGE_PREFIX}-${_n}"
    _pkgname["${_n}"]="${_p}"
    pkgname+=("${_p}")
done
readonly _pkgname
pkgbase="mingw-w64-${_realname}"
# If you are upgrading to a new version, please run setup_perl_dirs.sh on the
# (patched) source tree to update hard-coded path values. If there are any
# changes, update the exisitng patches or add a new one.
#
# Run updpkgprovs after the package is built and installed to update the
# provides array, then repackage.
pkgver="5.28.0"
#       v    ^
pkgrel="1"
pkgdesc="A highly capable, feature-rich programming language (mingw-w64)"
url="https://www.perl.org"
arch=("any")
license=("Artistic-1.0-Perl" "GPL-1.0-or-later")
options=("staticlibs" "strip" "docs" "!purge" "emptydirs")
makedepends=(
    ${MINGW_PACKAGE_PREFIX}-gcc
)
depends=(
    ${MINGW_PACKAGE_PREFIX}-gcc-libs
    ${MINGW_PACKAGE_PREFIX}-winpthreads
    ${MINGW_PACKAGE_PREFIX}-make
)
declare -rga _sources=(
    perlprofile.in
    perlinstall.in
)
if [[ -z "${SRCURI:-}" ]]; then
declare -rga _patches=(
    001-fhs-directory-structure.patch
    002-relocate-html-documentation.patch
    003-replace-batch-scripts-with-bare-perl.patch
    004-fix-cpan-external-programs.patch
    005-rename-cpan-home.patch
    006-generate-manpages.patch
)
source=(
    "https://www.cpan.org/src/5.0/${_realname}-${pkgver}.tar.xz"
    "${_patches[@]}"
    "${_sources[@]}"
)
else
source=(
    "${_realname}-${pkgver}::${SRCURI}"
    "${_sources[@]}"
)
SKIPCHECKSUMS=1
fi
## Populated by the updpkgprovs script
provides=(
    "${MINGW_PACKAGE_PREFIX}-perl-_charnames=1.450.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Amiga-ARexx=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Amiga-Exec=0.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-AnyDBM_File=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-App-Cpan=1.670.0"
    "${MINGW_PACKAGE_PREFIX}-perl-App-Prove=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-App-Prove-State=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-App-Prove-State-Result=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-App-Prove-State-Result-Test=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Archive-Tar=2.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Archive-Tar-Constant=2.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Archive-Tar-File=2.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-arybase=0.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Attribute-Handlers=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-attributes=0.330.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie=2.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-exception=2.290.20"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-exception-system=2.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-hints=2.290.10"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-Scope-Guard=2.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-Scope-GuardStack=2.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-skip=2.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-Util=2.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-AutoLoader=5.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-AutoSplit=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autouse=1.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-B=1.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-base=2.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-B-Concise=1.3.0"
    "${MINGW_PACKAGE_PREFIX}-perl-B-Debug=1.260.0"
    "${MINGW_PACKAGE_PREFIX}-perl-B-Deparse=1.480.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Benchmark=1.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bigint=0.490.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bignum=0.490.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bigrat=0.490.0"
    "${MINGW_PACKAGE_PREFIX}-perl-blib=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-B-Op_private=5.28.0"
    "${MINGW_PACKAGE_PREFIX}-perl-B-Showlex=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-B-Terse=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-B-Xref=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bytes=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Carp=1.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Carp-Heavy=1.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-charnames=1.450.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Class-Struct=0.650.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Compress-Raw-Bzip2=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Compress-Raw-Zlib=2.76.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Compress-Zlib=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Config=5.28.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Config-Extensions=0.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Config-Perl-V=0.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-constant=1.330.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN=2.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Author=5.500.200"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Bundle=5.500.300"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-CacheMgr=5.500.200"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Complete=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Debug=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-DeferredCode=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Distribution=2.190.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Distroprefs=6.0.100"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Distrostatus=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Exception-blocked_urllist=1.1.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Exception-RecursiveDependency=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Exception-yaml_not_installed=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Exception-yaml_process_error=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-FirstTime=5.531.100"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-FTP=5.501.100"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-FTP-netrc=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-HandleConfig=5.500.800"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-HTTP-Client=1.960.100"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-HTTP-Credentials=1.960.100"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Index=2.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-InfoObj=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Kwalify=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-LWP-UserAgent=1.960.100"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Meta=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Meta-Converter=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Meta-Feature=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Meta-History=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Meta-Merge=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Meta-Prereqs=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Meta-Requirements=2.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Meta-Spec=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Meta-Validator=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Meta-YAML=0.18.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Mirrors=2.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Module=5.500.300"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Nox=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Plugin=0.960.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Plugin-Specfile=0.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Prompt=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Queue=5.500.200"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Shell=5.500.700"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Tarzip=5.501.200"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-URL=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-CPAN-Version=5.500.300"
    "${MINGW_PACKAGE_PREFIX}-perl-Cwd=3.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Data-Dumper=2.170.0"
    "${MINGW_PACKAGE_PREFIX}-perl-DB_File=1.840.0"
    "${MINGW_PACKAGE_PREFIX}-perl-DB=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-DBM_Filter=0.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-DBM_Filter-compress=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-DBM_Filter-encode=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-DBM_Filter-int32=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-DBM_Filter-null=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-DBM_Filter-utf8=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-deprecate=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Devel-Peek=1.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Devel-PPPort=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Devel-SelfStubber=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-diagnostics=1.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Digest=1.170.100"
    "${MINGW_PACKAGE_PREFIX}-perl-Digest-base=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Digest-file=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Digest-MD5=2.550.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Digest-SHA=6.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-DirHandle=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Dumpvalue=1.180.0"
    "${MINGW_PACKAGE_PREFIX}-perl-DynaLoader=1.450.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode=2.970.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-Alias=2.240.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-Byte=2.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-CJKConstants=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-CN=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-CN-HZ=2.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-Config=2.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-EBCDIC=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-Encoder=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-Encoding=2.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-GSM0338=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-Guess=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-JP=2.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-JP-H2Z=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-JP-JIS7=2.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-KR=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-KR-2022_KR=2.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-MIME-Header=2.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-MIME-Header-ISO_2022_JP=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-MIME-Name=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-Symbol=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-TW=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-Unicode=2.170.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Encode-Unicode-UTF7=2.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encoding=2.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encoding-warnings=0.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-English=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Env=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Errno=1.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-experimental=0.19.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Exporter=5.730.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Exporter-Heavy=5.730.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Base=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-aix=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-android=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-cygwin=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-darwin=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-dec_osf=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-os2=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-Unix=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-Windows=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-Windows-BCC=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-Windows-GCC=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-Windows-MSVC=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-CBuilder-Platform-VMS=0.280.230"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Command=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Command-MM=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Constant=0.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Constant-Base=0.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Constant-ProxySubs=0.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Constant-Utils=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Constant-XS=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Embed=1.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Install=2.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Installed=2.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Liblist=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Liblist-Kid=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MakeMaker=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MakeMaker-Config=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MakeMaker-Locale=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MakeMaker-version=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MakeMaker-version-regex=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Manifest=1.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Miniperl=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Mkbootstrap=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Mksymlists=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_AIX=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_Any=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_BeOS=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_Cygwin=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_Darwin=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_DOS=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_MacOS=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_NW5=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_OS2=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_QNX=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_Unix=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_UWIN=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_Win32=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_Win95=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_VMS=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM_VOS=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MM=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-MY=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Packlist=2.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-ParseXS=3.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-ParseXS-Constants=3.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-ParseXS-CountLines=3.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-ParseXS-Eval=3.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-ParseXS-Utilities=3.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-testlib=7.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Typemaps=3.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Typemaps-Cmd=3.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Typemaps-InputMap=3.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Typemaps-OutputMap=3.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-Typemaps-Type=3.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ExtUtils-XSSymSet=1.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Fatal=2.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Fcntl=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-feature=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-fields=2.240.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Basename=2.850.0"
    "${MINGW_PACKAGE_PREFIX}-perl-FileCache=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Compare=1.100.600"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Copy=2.330.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-DosGlob=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Fetch=0.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Find=1.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Glob=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-GlobMapper=1.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-FileHandle=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Path=2.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Spec=3.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Spec-AmigaOS=3.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Spec-Cygwin=3.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Spec-Epoc=3.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Spec-Functions=3.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Spec-Mac=3.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Spec-OS2=3.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Spec-Unix=3.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Spec-Win32=3.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Spec-VMS=3.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-stat=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-File-Temp=0.230.400"
    "${MINGW_PACKAGE_PREFIX}-perl-filetest=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Filter-Simple=0.950.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Filter-Util-Call=1.580.0"
    "${MINGW_PACKAGE_PREFIX}-perl-FindBin=1.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-GDBM_File=1.170.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Getopt-Long=2.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Getopt-Std=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Hash-Util=0.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Hash-Util-FieldHash=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-HTTP-Tiny=0.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-I18N-Collate=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-I18N-Langinfo=0.170.0"
    "${MINGW_PACKAGE_PREFIX}-perl-I18N-LangTags=0.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-I18N-LangTags-Detect=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-I18N-LangTags-List=0.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-if=0.60.800"
    "${MINGW_PACKAGE_PREFIX}-perl-integer=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Adapter-Bzip2=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Adapter-Deflate=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Adapter-Identity=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Base=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Base-Common=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Bzip2=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Deflate=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Gzip=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Gzip-Constants=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-RawDeflate=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Zip=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Zip-Constants=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Zlib-Constants=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Compress-Zlib-Extra=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Dir=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-File=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Handle=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Pipe=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Poll=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Seekable=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Select=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Socket=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Socket-INET=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Socket-IP=0.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Socket-UNIX=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Uncompress-Adapter-Bunzip2=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Uncompress-Adapter-Identity=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Uncompress-Adapter-Inflate=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Uncompress-AnyInflate=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Uncompress-AnyUncompress=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Uncompress-Base=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Uncompress-Bunzip2=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Uncompress-Gunzip=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Uncompress-Inflate=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Uncompress-RawInflate=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Uncompress-Unzip=2.74.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IO-Zlib=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IPC-Cmd=1.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IPC-Msg=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IPC-Open2=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IPC-Open3=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IPC-Semaphore=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IPC-SharedMem=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-IPC-SysV=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-JSON-PP=2.970.10"
    "${MINGW_PACKAGE_PREFIX}-perl-JSON-PP-Boolean=2.970.10"
    "${MINGW_PACKAGE_PREFIX}-perl-less=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-lib=0.640.0"
    "${MINGW_PACKAGE_PREFIX}-perl-List-Util=1.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-List-Util-XS=1.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-locale=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Constants=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Country_Codes=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Country_Retired=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Country=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Currency_Codes=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Currency_Retired=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Currency=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-LangExt_Codes=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-LangExt_Retired=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-LangExt=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-LangFam_Codes=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-LangFam_Retired=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-LangFam=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Language_Codes=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Language_Retired=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Language=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-LangVar_Codes=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-LangVar_Retired=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-LangVar=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Script_Codes=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Script_Retired=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Codes-Script=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Country=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Currency=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Language=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Maketext=1.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Maketext-Guts=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Maketext-GutsLoader=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Maketext-Simple=0.210.100"
    "${MINGW_PACKAGE_PREFIX}-perl-Locale-Script=3.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Math-BigFloat=1.999.811"
    "${MINGW_PACKAGE_PREFIX}-perl-Math-BigFloat-Trace=0.490.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Math-BigInt=1.999.811"
    "${MINGW_PACKAGE_PREFIX}-perl-Math-BigInt-Calc=1.999.811"
    "${MINGW_PACKAGE_PREFIX}-perl-Math-BigInt-CalcEmu=1.999.811"
    "${MINGW_PACKAGE_PREFIX}-perl-Math-BigInt-FastCalc=0.500.600"
    "${MINGW_PACKAGE_PREFIX}-perl-Math-BigInt-Lib=1.999.811"
    "${MINGW_PACKAGE_PREFIX}-perl-Math-BigInt-Trace=0.490.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Math-BigRat=0.261.300"
    "${MINGW_PACKAGE_PREFIX}-perl-Math-Complex=1.590.100"
    "${MINGW_PACKAGE_PREFIX}-perl-Math-Trig=1.230.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Memoize=1.30.100"
    "${MINGW_PACKAGE_PREFIX}-perl-Memoize-AnyDBM_File=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Memoize-Expire=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Memoize-ExpireFile=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Memoize-ExpireTest=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Memoize-NDBM_File=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Memoize-SDBM_File=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Memoize-Storable=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-meta_notation"
    "${MINGW_PACKAGE_PREFIX}-perl-MIME-Base64=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-MIME-QuotedPrint=3.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Module-CoreList=5.201.806.220"
    "${MINGW_PACKAGE_PREFIX}-perl-Module-CoreList-Utils=5.201.806.220"
    "${MINGW_PACKAGE_PREFIX}-perl-Module-Load=0.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Module-Load-Conditional=0.680.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Module-Loaded=0.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Module-Metadata=1.0.33"
    "${MINGW_PACKAGE_PREFIX}-perl-Moped-Msg=0.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-mro=1.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-NDBM_File=1.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-Cmd=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-Config=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-Domain=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-FTP=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-FTP-A=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-FTP-dataconn=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-FTP-E=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-FTP-I=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-FTP-L=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-hostent=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-netent=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-Netrc=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-NNTP=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-Ping=2.620.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-POP3=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-protoent=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-servent=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-SMTP=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Net-Time=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-NEXT=0.670.100"
    "${MINGW_PACKAGE_PREFIX}-perl-O=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ODBM_File=1.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ok=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Opcode=1.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-open=1.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ops=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-OS2-DLL=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-OS2-ExtAttr=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-OS2-PrfDB=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-OS2-Process=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-OS2-REXX=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-overload=1.300.0"
    "${MINGW_PACKAGE_PREFIX}-perl-overloading=0.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-overload-numbers"
    "${MINGW_PACKAGE_PREFIX}-perl-Params-Check=0.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-parent=0.236.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Parse-CPAN-Meta=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-perlfaq=5.21.11"
    "${MINGW_PACKAGE_PREFIX}-perl-PerlIO=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-PerlIO-encoding=0.260.0"
    "${MINGW_PACKAGE_PREFIX}-perl-PerlIO-mmap=0.16.0"
    "${MINGW_PACKAGE_PREFIX}-perl-PerlIO-scalar=0.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-PerlIO-via=0.170.0"
    "${MINGW_PACKAGE_PREFIX}-perl-PerlIO-via-QuotedPrint=0.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Perl-OSType=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Checker=1.730.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Escapes=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Find=1.630.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Functions=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Functions-Functions=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Html=1.240.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-InputObjects=1.630.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Man=4.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-ParseLink=4.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Parser=1.630.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-ParseUtils=1.630.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc=3.280.100"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-BaseTo=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-GetOptsOO=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-ToANSI=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-ToChecker=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-ToMan=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-ToNroff=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-ToPod=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-ToRtf=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-ToTerm=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-ToText=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-ToTk=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Perldoc-ToXml=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-PlainText=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Select=1.630.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-BlackBox=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-Checker=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-Debug=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-DumpAsText=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-DumpAsXML=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-HTML=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-HTMLBatch=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-HTMLLegacy=5.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-LinkSection=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-Methody=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-Progress=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-PullParser=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-PullParserEndToken=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-PullParserStartToken=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-PullParserTextToken=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-PullParserToken=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-RTF=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-Search=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-SimpleTree=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-Text=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-TextContent=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-TiedOutFH=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-Transcode=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-TranscodeDumb=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-TranscodeSmart=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-XHTML=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Simple-XMLOutStream=3.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Text=4.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Text-Color=4.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Text-Overstrike=4.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Text-Termcap=4.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Pod-Usage=1.690.0"
    "${MINGW_PACKAGE_PREFIX}-perl-POSIX=1.840.0"
    "${MINGW_PACKAGE_PREFIX}-perl-re=0.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Safe=2.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Scalar-Util=1.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-SDBM_File=1.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Search-Dict=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-SelectSaver=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-SelfLoader=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sigtrap=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Socket=2.27.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sort=2.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Storable=3.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Storable-Limit"
    "${MINGW_PACKAGE_PREFIX}-perl-strict=1.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-subs=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Sub-Util=1.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Symbol=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Sys-Hostname=1.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Sys-Syslog=0.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Sys-Syslog-Win32"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Base=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Formatter-Base=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Formatter-Color=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Formatter-Console=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Formatter-Console-ParallelSession=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Formatter-Console-Session=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Formatter-File=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Formatter-File-Session=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Formatter-Session=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Harness=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Harness-Env=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Object=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Aggregator=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Grammar=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Iterator=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Iterator-Array=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-IteratorFactory=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Iterator-Process=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Iterator-Stream=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Multiplexer=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Result=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Result-Bailout=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Result-Comment=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-ResultFactory=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Result-Plan=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Result-Pragma=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Result-Test=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Result-Unknown=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Result-Version=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Result-YAML=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Scheduler=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Scheduler-Job=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Scheduler-Spinner=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-Source=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-SourceHandler=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-SourceHandler-Executable=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-SourceHandler-File=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-SourceHandler-Handle=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-SourceHandler-Perl=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-SourceHandler-RawTAP=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-YAMLish-Reader=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-TAP-Parser-YAMLish-Writer=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Term-ANSIColor=4.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Term-Cap=1.170.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Term-Complete=1.403.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Term-ReadLine=1.170.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Test=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-API=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-API-Breakage=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-API-Context=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-API-Instance=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-API-Stack=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Bail=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Diag=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Encoding=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Exception=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-About=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-Amnesty=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-Assert=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-Control=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-Error=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-Hub=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-Info=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-Meta=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-Parent=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-Plan=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-Render=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-EventFacet-Trace=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Fail=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Generic=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Note=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Ok=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Pass=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Plan=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Skip=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Subtest=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-TAP-Version=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-V2=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Event-Waiting=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Formatter=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Formatter-TAP=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Hub=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Hub-Interceptor=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Hub-Interceptor-Terminator=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Hub-Subtest=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-IPC=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-IPC-Driver=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-IPC-Driver-Files=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Tools-Tiny=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Util=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Util-ExternalMeta=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Util-Facets2Legacy=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Util-HashBase=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test2-Util-Trace=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Builder=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Builder-Formatter=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Builder-IO-Scalar=2.114.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Builder-Module=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Builder-Tester=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Builder-Tester-Color=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Builder-TodoDiag=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Harness=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-More=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Simple=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Tester=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Tester-Capture=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Tester-CaptureRunner=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-Tester-Delegate=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Test-use-ok=1.302.133"
    "${MINGW_PACKAGE_PREFIX}-perl-Text-Abbrev=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Text-Balanced=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Text-ParseWords=3.300.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Text-Tabs=2013.52.300"
    "${MINGW_PACKAGE_PREFIX}-perl-Text-Wrap=2013.52.300"
    "${MINGW_PACKAGE_PREFIX}-perl-Thread=3.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Thread-Queue=3.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-threads=2.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Thread-Semaphore=2.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-threads-shared=1.580.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Tie-Array=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Tie-File=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Tie-Handle=4.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Tie-Hash=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Tie-Hash-NamedCapture=0.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Tie-Memoize=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Tie-RefHash=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Tie-Scalar=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Tie-StdHandle=4.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Tie-SubstrHash=1.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Time-gmtime=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Time-HiRes=1.975.900"
    "${MINGW_PACKAGE_PREFIX}-perl-Time-Local=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Time-localtime=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Time-Piece=1.320.400"
    "${MINGW_PACKAGE_PREFIX}-perl-Time-Seconds=1.320.400"
    "${MINGW_PACKAGE_PREFIX}-perl-Time-tm=1.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode=10.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode-Collate=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode-Collate-CJK-Big5=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode-Collate-CJK-GB2312=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode-Collate-CJK-JISX0208=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode-Collate-CJK-Korean=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode-Collate-CJK-Pinyin=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode-Collate-CJK-Stroke=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode-Collate-CJK-Zhuyin=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode-Collate-Locale=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode-Normalize=1.260.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Unicode-UCD=0.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicore-Name"
    "${MINGW_PACKAGE_PREFIX}-perl-UNIVERSAL=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-User-grent=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-User-pwent=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-utf8=1.210.0"
    "${MINGW_PACKAGE_PREFIX}-perl-warnings=1.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-warnings-register=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-vars=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-version=0.992.300"
    "${MINGW_PACKAGE_PREFIX}-perl-version-regex=0.992.300"
    "${MINGW_PACKAGE_PREFIX}-perl-Win32=0.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Win32API-File=0.120.300"
    "${MINGW_PACKAGE_PREFIX}-perl-Win32API-File-inc-ExtUtils-Myconst2perl=1.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-Win32CORE=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-VMS-DCLsym=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-VMS-Filespec=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-vmsish=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-VMS-Stdio=2.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-XS-APItest=0.980.0"
    "${MINGW_PACKAGE_PREFIX}-perl-XSLoader=0.300.0"
    "${MINGW_PACKAGE_PREFIX}-perl-XS-Typemap=0.160.0"
)
## End of pkgupdprovs modifications

## Run updpkgsums to update
sha256sums=('059b3cb69970d8c8c5964caced0335b4af34ac990c8e61f7e3f90cd1c2d11e49'
            '7238ed1e5c30b5e413c01b49aed082d10de779deebc62ef3ce04a59b68dfb5c0'
            '93585dfb9c82cc68de5d4e0d534cb750fe7cc9b59896d2f4e88b3062afb4088c'
            'bcf3ba68959bfe8cc8888c1b1fd83588dd02b03e1ab7c89341477be3f44d896d'
            'a278d0a3471118192f1eca48f3dd120e01df356f88c6aa5b766cb6773c90efba'
            'b6055ad4e61133bf819cb50a36bac8a848c8649bcca70e4d0e48da60edd200e5'
            'f3308d4589c547941a87d8310f6a93e2a76c36e10e011bdebbcc35d4f0570a40'
            'a98fc21fb079a9b31194292191ea8be1590b97be16b57cc25c3cf73a5d2bd25e'
            'ec41f5054fcc61cd3f0942dc42fe24fcca50a9ff13cb42003b119e221a207d40')

declare -rg _build="build-${CARCH}-${_realname}-${pkgver}"
declare -gA _destdir=()

prepare() {
    cd "${srcdir}/${_realname}-${pkgver}"
    attrib.exe -r //s
    local p
    for p in "${_patches[@]}"; do
        msg2 "Applying %s" "$p"
        patch -p1 -i "${srcdir}"/"$p"
    done
}

_make() {
    # Please read README.win32 in the source package.
    # Using pkgdirbase here is not supported but required since we need the
    # package directory at build time, something which makepkg doesn't consider.
    : "${_destdir["core"]:="${pkgdirbase}/build-core"}"
    : "${_destdir["doc"]:="${pkgdirbase}/build-doc"}"
    local prefix="$(cygpath -w "${_destdir["core"]}${MINGW_PREFIX}")"
    local docprefix="$(cygpath -w "${_destdir["doc"]}${MINGW_PREFIX}")"
    local cchome="$(cygpath -w "${MINGW_PREFIX}")"
    local sysroot="$(cygpath -u "${SYSTEMROOT}")"
    local -i jobs="${JOBS:-$(nproc)}"
    local path="${sysroot}/system32:${sysroot}:${MINGW_PREFIX}/bin"
    # README.win32 recommends bulding under Windows' default shell (cmd.exe)
    # and win32/makefile.mk recommends setting SHELL to it as well
    local cmd="$(cygpath -u "${COMSPEC}")"
    local cmdline=(
        "${cmd}" //C mingw32-make
        -j"${jobs}"
        TEST_JOBS="${jobs}"
        CCTYPE=GCC
        CCHOME="${cchome}"
        INST_DRV="${prefix:0:2}"
        INST_TOP="${prefix}"
        INST_DOC="${docprefix}"
        USE_64_BIT_INT=define
        USE_MINGW_ANSI_STDIO=define
        SHELL="${COMSPEC}"
        PLMAKE=mingw32-make
    )
    if [[ "$(uname --machine)" == "x86_64" && "${CARCH}" == "i686" ]]; then
        cmdline+=(WIN64=undef)
    fi
    cd "${srcdir}/${_build}/win32"
    msg2 "Running \"%s\"" "${cmdline[*]}$( (($#)) && echo -n " $*")"
    # Setting PATH here is not strictly necessary but it might make compilation
    # slightly faster to have the mostly used commands early on the PATH and
    # avoids interference with other programs on the PATH during tests.
    PATH="${path}" SHELL="" LC_ALL=C LANG=C "${cmdline[@]}" "$@"
}

build() {
    if [[ -e "${srcdir}/${_build}" ]]; then
        local -i i=1
        while [[ -e "${srcdir}/${_build}~${i}" ]]; do ((++i)); done
        mv -T "${srcdir}/${_build}" "${srcdir}/${_build}~${i}"
    fi
    mv -T "${srcdir}/${_realname}-${pkgver}" "${srcdir}/${_build}"
    local postfix
    [[ "${CARCH}" == "x86_64" ]] && postfix="w64" || postfix="w32"
    sed -ri "/@@CPAN_HOME@@/{N;s/([\._])cpan/\1cpan-${postfix}/g;D}" \
        "${srcdir}/${_build}/cpan/CPAN/lib/CPAN/HandleConfig.pm"
    _make
}

check() {
    # Some tests will fail, this is expected on Windows. Still, it might be good
    # to have this information in the build logs.
    _make test || warning '%s' "
        Some of the tests failed, but this is more or less expected on Windows.
        Please consult the log files for specifics."
}

eval "package_${_pkgname["perl"]}() { _package_core; }" # perl
eval "package_${_pkgname["perl-doc"]}() { _package_doc; }"  # perl-doc

_package_common() {
    install="${pkgname}.install"

    pushd "${pkgdir}${MINGW_PREFIX}" &>/dev/null
    find -O3 . -type d -empty -delete

    # Path relocation. This is done by replacing hard-coded paths with relocate
    # patterns that will be resolved on package installation.

    local grep_args=() sed_args=() single= double= html= path=
    for path in "${_destdir[@]/%/\/}" /; do
        single="$(cygpath -w "${path}")"
        single="${single//\\/\\\\}"        # \  -> \\
        double="${single//\\\\/\\\\\\\\}"  # \\ -> \\\\
        html="${single//\\\\/\\\/}"        # \\ -> \/
        grep_args+=(
            -e "${html}"
            -e "${double}"
            -e "${single}"
        )
        sed_args+=(
            -e "s/${html}/@PERL_RELOCATE_HTML@\\//g"
            -e "s/${double}/@PERL_RELOCATE_DOUBLE@\\\\\\\\/g"
            -e "s/${single}/@PERL_RELOCATE@\\\\/g"
        )
    done

    msg2 "Creating relocate patterns for:"
    local -i i
    for ((i=0; i<${#grep_args[@]}; ++i)); do
        if ((i%2 == 1)); then
            plain "%b" "${grep_args[i]}"
        fi
    done

    # Attach list of files containing relocate patterns for use in post-install script.
    local relocate_list="$(mktemp)"
    grep -rilZ "${grep_args[@]}" . > "${relocate_list}"

    xargs -0 -a "${relocate_list}" sed -i "${sed_args[@]}"

    install -Dvm644 <(\
        sed -e "s/@PREFIX@/${MINGW_PREFIX//\//\\\/}/g" \
            -e "/@REM@/d" \
            "${srcdir}"/perlinstall.in
        gzip -c -9 "${relocate_list}" | base64
    ) "${startdir}/${install}"

    rm "${relocate_list}"
    popd &>/dev/null
}

_package_doc() {
    local -
    local orig_shopt="$(shopt -p extglob)"

    set -o nounset
    set -o pipefail
    shopt -s extglob

    pkgdesc="Perl manpages and html documentation (mingw-64)"
    depends=()
    optdepends=("${_pkgname["perl"]}: Core package")
    provides=()

    mv -T "${_destdir["doc"]}" "${pkgdir}"
    _package_common

    eval "$orig_shopt"
}

_package_core() {
    local -
    local orig_shopt="$(shopt -p extglob || true)"

    set -o nounset
    set -o pipefail
    shopt -s extglob

    optdepends=("${_pkgname["perl-doc"]}: Extra manpages, perldocs and html documentation")
    _make install

    cd "${pkgdirbase}"
    attrib.exe -R //S

    msg2 "Cleaning up"
    find -O3 "${_destdir[@]}" \( -type f \( \
            -name '.packlist' -o -name 'perllocal.pod' -o -name '*.tmp' \
        \) -o -type d -empty \) -delete

    cd "${_destdir["core"]}${MINGW_PREFIX}"
    local config_heavy="$(find . -name Config_heavy.pl -print -quit)"

    local inst_bin="$(cygpath -u "$(sed -nr "s/^installbin='([^']+)'.*/\\1/p" "${config_heavy}")")"
    local inst_script="$(cygpath -u "$(sed -nr "s/^installscript='([^']+)'.*/\\1/p" "${config_heavy}")")"
    local inst_man="$(cygpath -u "$(sed -nr "s/^installman1dir='([^']+)'.*/\\1/p" "${config_heavy}")")"
    local man1ext="$(cygpath -u "$(sed -nr "s/^man1ext='([^']+)'.*/\\1/p" "${config_heavy}")")"

    local patterns=() pathext=() ext=
    mapfile -d ';' -t pathext <<< "${PATHEXT}"
    mapfile -d $'\0' -t patterns < <(\
        find -O3 "$inst_bin" "$inst_script" -maxdepth 1 -type f -executable -print0
    )
    patterns=("${patterns[@]/#*\//\/}")
    for ext in "${pathext[@]}"; do
        patterns=("${patterns[@]%${ext,,}}")
    done
    patterns=("${patterns[@]/%/".${man1ext}"}")

    msg2 "Moving pods to documentation package"
    cd "${_destdir["core"]}"
    local pods=()
    mapfile -t -d $'\0' pods < <(\
        find -O3 . \( \
                -type d -name pods -o \
                -type f -name '*.pod' ! -iname 'Config.pod' ! -iname 'POSIX.pod' \
            \) -print0 -prune
    )
    if (( ${#pods[@]} )); then
        printf '%s\0' "${pods[@]}" | xargs -r -0 cp --parents -rlpt "${_destdir["doc"]}"
        printf '%s\0' "${pods[@]}" | xargs -r -0 rm -r
    fi

    msg2 "Moving manpages for core programs to core package"
    cd "${_destdir["doc"]}"
    mapfile -t -d $'\0' pods < <(\
        find -O3 ".${inst_man#"${PWD}"}" -maxdepth 1 -type f -print0 \
            | grep -zZFf <(printf '%s\n' "${patterns[@]}") \
        || true
    )
    if (( ${#pods[@]} )); then
        printf '%s\0' "${pods[@]}" | xargs -r -0 cp --parents -lpt "${_destdir["core"]}"
        printf '%s\0' "${pods[@]}" | xargs -r -0 rm
    fi

    mv -T "${_destdir["core"]}" "${pkgdir}"
    _package_common

    msg2 "Post-install configuration"
    cd "${pkgdir}${MINGW_PREFIX}"

    ### Perl Settings ###
    # Change man page extensions for site and vendor module builds.
    sed -i -e '/^man1ext=/ s/=.*/='"'"'1p'"'"'/' \
           -e '/^man3ext=/ s/=.*/='"'"'3pm'"'"'/' \
           "${config_heavy}"

    msg2 "Getting PATH components"
    local skip_paths=("${MINGW_PREFIX}/bin")
    local path_arr=()
    # Parse the configuration for paths that should be added to PATH
    # The sorting is a bit hacky...
    local p
    while IFS='' read -r p; do
        p="${p//\\/\/}"
        if [[ -n "${p}" \
              && ! "$(printf '%s\n' "${skip_paths[@]}" "${path_arr[@]}")" \
              =~ (^|$'\n')"${p}"($'\n'|$) ]]; then
            path_arr+=("${p}")
        fi
    done < <(\
        sed -nr \
            -e "s/^installsitebin='@PERL_.*?@(.*)'/1\\t\\1/p" \
            -e "s/^installsitescript='@PERL_.*?@(.*)'/2\\t\\1/p" \
            -e "s/^installvendorbin='@PERL_.*?@(.*)'/3\\t\\1/p" \
            -e "s/^installvendorscript='@PERL_.*?@(.*)'/4\\t\\1/p" \
            -e "s/^installbin='@PERL_.*?@(.*)'/5\\t\\1/p" \
            -e "s/^installscript='@PERL_.*?@(.*)'/6\\t\\1/p" \
            "${config_heavy}" \
        | sort -n -k1,1 | cut -f2- | uniq
    )
    local path="$(IFS=':'; echo "${path_arr[*]}")"

    msg2 "Adding extra files"
    local profile="/etc/profile.d/z-${_realname}-${CARCH}.sh"
    install -Dvm644 <(sed \
            -e "/^\s*local\s\+mypath=/ s/=.*/=\"${path//\//\\\/}\"/" \
            -e "s/@PREFIX@/${MINGW_PREFIX//\//\\\/}/g" \
            -e "s/@FILENAME@/${profile//\//\\\/}/g" \
            -e "/@REM@/d" \
            "${srcdir}"/perlprofile.in) \
        "${pkgdir}${profile}"

    # Link perl executable to main bin directory
    local perldir="$(dirname "$(find ./bin -name "perl.exe" -print -quit)")"
    if [[ "${perldir}" != ./bin ]]; then
        ln -vt ./bin/ "${perldir}/perl"{.exe,5*.dll}
    fi

    # Add these so we have them on PATH before installing the first package
    # XXX: Is this a necessary?
    sed -nr \
        "s/^install(vendor|site)(bin|script|lib|arch|(man|html)[13]dir)='@PERL_.*?@(.*)'/\\4/p" \
        "${config_heavy}" \
        | sort | uniq | while IFS='' read -r p; do
            p="${pkgdir}${p//\\/\/}"; [[ -e "${p}" ]] || echo "${p}"
        done \
        | xargs -r install -dvm755

    # Licenses
    install -Dvm644 -t "share/licenses/${_realname}" "${srcdir}/${_build}/"{"Copying","Artistic"}
    # Other docs
    install -Dvm644 -t "share/doc/${_realname}"      "${srcdir}/${_build}/"{"README","Changes"}

    eval "$orig_shopt"
}

# vim: set ts=4 sw=4 et ai:
